package com.luych.toolbox.data.service.dao;

import com.luych.toolbox.common.enums.DataTransporterPlanStatus;
import com.luych.toolbox.data.service.entity.DataTransporterPlan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface DataTransporterPlanDao extends JpaRepository<DataTransporterPlan, String>, JpaSpecificationExecutor<DataTransporterPlan> {

    int countByDataSourceFromIdOrDataSourceToId(String dataSourceOneId, String dataSourceTwoId);

    Page<DataTransporterPlan> findByNameLike(String name, Pageable pageable);

    List<DataTransporterPlan> findByStatusNot(DataTransporterPlanStatus status);

}